home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9236 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.6 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: argc/argv & switches
  5. Date: 08 Mar 1996 16:59:31 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Mar8095931@qcd.lanl.gov>
  8. References: <4h2j8j$9gn@milo.freenet.vancouver.bc.ca> <danpop.825593142@rscernix>
  9.     <313E0094.167EB0E7@fore.com> <4hl52oINNa4l@anvil.ugrad.cs.ubc.ca>
  10.     <danpop.826238070@rscernix> <4ho9dv$bcb@castle.nando.net>
  11. NNTP-Posting-Host: qcd.lanl.gov
  12. Mime-Version: 1.0
  13. Content-Type: text
  14. In-reply-to: actuary@nando.net's message of 8 Mar 1996 03:26:55 GMT
  15.  
  16. In article <4ho9dv$bcb@castle.nando.net>
  17. actuary@nando.net   (Bill McCarthy) writes:
  18. <snip>
  19. BM: According to Herbert Schildt, 5.1.2.2.1 states "The parameters argc and
  20. BM: argv and the strings pointed to by the argv array shall be modifiable
  21. BM: by the program, and retain their last-stored values between program
  22. BM: startup and program termination."
  23. BM: 
  24. BM: I'm just reading the standard for the first time, and am only up to page
  25. BM: 26 :-( so be kind - what am I missing?
  26.  
  27. Yes, argc and argv must be modifiable, as well as the strings pointed
  28. to by argv. The discussion was however about the pointers to the
  29. strings, and no statement about those exists here.
  30.  
  31. BM: 
  32. BM: While we're on the standard, Dan, is the "missing period" contained on
  33. BM: page 26 (6.1.3.1)?
  34. BM: 
  35. BM: I've been stuck on this page because (1) the standard seems to define
  36. BM: numbers such as "123" (i.e. a string of 1 or more digits) to be a double
  37. BM: here and as an int in the following section (I peaked :-).  There appears
  38. BM: to be a need for a period at the end of the second line following
  39. BM: "fractional-constant."
  40.  
  41. 123 is an integer constant, not a double.
  42.  
  43. BM: 
  44. BM: And (2), negative numbers cannot be doubles?  From experience,
  45. BM: this appears wrong.  But the only sign I see in the syntax is in the
  46. BM: exponent-part.
  47. BM: 
  48.  
  49. negative numbers don't exist as tokens. The - is an unary operator
  50. which `negates' the next number: whether that results in a negative
  51. number depends on the semantics of -. Thus for example -3U is a
  52. positive number.
  53.  
  54. Cheers
  55. Tanmoy
  56. --
  57. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  58. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  59. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  60. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  61. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  62. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  63.